package Temp.杂乱无章;

import java.util.Scanner;

public class 入门阶乘的和 {
    public static void main(String args[]) {
        int n = 4; // 输入的正整数，这里示例为4
        long result = factorial(n);
        System.out.println("阶乘 " + n + "! = " + result);
    }

    public static long factorial(long number) {
        if (number <= 1)
            return 1;
        else
            return number * factorial(number - 1);
    }
}
